import 'package:easy_refresh/easy_refresh.dart';
import 'package:flutter/material.dart';

import '../model/page.dart';

abstract class IRefreshState<T> {
  @protected
  IRefreshState();

  late final EasyRefreshController controller = EasyRefreshController(
    controlFinishRefresh: true,
    controlFinishLoad: enablePullup,
  );

  final updateBodyId = 'update-body';

  PageModel<T>? _page;

  PageModel<T>? get page {
    return enablePullup ? _page ??= PageModel() : null;
  }

  T? dataModel;

  bool enablePullup = true;

  TabController? tabCtrl;
}
